// TestView.h : interface of the CTestView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TESTVIEW_H__6BDA77EE_5AF6_11D2_945E_0050FC22ED76__INCLUDED_)
#define AFX_TESTVIEW_H__6BDA77EE_5AF6_11D2_945E_0050FC22ED76__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#pragma warning (disable:4786)
#include "Scene3D.h"
#include "DialogListener.h"
#include "EngineSelectDialog.h"
#include <deque>
#include "VisualName.h"
#include "Roam3D.h"
#include "Text3D.h"

class CTestView : public CView, public CDialogListener, public Object3DFunctor<VoidPtr>
{
protected: // create from serialization only
	CTestView();
	DECLARE_DYNCREATE(CTestView)

// Attributes
public:
	CTestDoc* GetDocument();
	virtual void finished(int result);
// Operations
public:
	virtual LIB3D_RETURN operator () (Object3D * o,VoidPtr &);
	virtual VoidPtr pushCallBack(VoidPtr,  Object3D * o);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	//}}AFX_VIRTUAL


public:
	virtual ~CTestView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif
	
protected:

// Generated message map functions
protected:
	CMenu * popup;
	CMenu * baseMenu;
	void InsertarArbolObjetos(CMenu * menu);
	bool inicializado;
	Scene3D * escena;
	CEngineSelectDialog * dlg;
	std::deque <VisualName> visuales;
	std::deque <TextureName> texturas;
	std::deque <Roam3D *> roams;
	afx_msg void OnInsertObject(UINT nID);
	float error;
	unsigned roamN,terrainN,lightN;
	Text3D * text;
	int nFrame;
	long startTime;

	//{{AFX_MSG(CTestView)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnPaint();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnTexturasJpeg();
	afx_msg void OnCmaraRotar();
	afx_msg void OnCmaraDesplazar();
	afx_msg void OnCmaraApuntaraobjeto();
	afx_msg void OnBogusVisualesCrearTerreno();
	afx_msg void OnVisualesGeometria();
	afx_msg void OnVisualesLuz();
	afx_msg void OnBogusCmaraCambiarngulodevision();
	afx_msg void OnPropiedades();
	afx_msg void OnCerrarVentana();
	afx_msg void OnVisualesEliminar();
	afx_msg void OnEliminarTextura();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	
};

#ifndef _DEBUG  // debug version in TestView.cpp
inline CTestDoc* CTestView::GetDocument()
   { return (CTestDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TESTVIEW_H__6BDA77EE_5AF6_11D2_945E_0050FC22ED76__INCLUDED_)
